//package com.juzipi.demo.config;
//
//
//import com.juzipi.demo.interceptors.JWTInterceptor;
//import org.springframework.context.annotation.Configuration;
//import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
//import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
//
////拦截器的配置
//
//@Configuration
//public class InterceptorConfig implements WebMvcConfigurer {
//
//
//
////    @Bean
////    public JWTInterceptor jwtInterceptor(){
////        return new JWTInterceptor();
////    }
//
//
//
//    @Override
//    public void addInterceptors(InterceptorRegistry registry) {
//
//        System.out.println("拦截器生效");
//        JWTInterceptor jwtInterceptor = new JWTInterceptor();
//        registry.addInterceptor(jwtInterceptor)
//                .addPathPatterns("/**")//其它都要验证
//                .excludePathPatterns("/login");
////                .excludePathPatterns("/login");//登录等接口放行
//    }
//}
